Uniform resource locator

In computing, a uniform resource locator or universal resource locator (URL) is a specific character string that constitutes a reference to an Internet resource.

A URL is technically a type of uniform resource identifier (URI) but in many technical documents and verbal discussions URL is often used as a synonym for URI.[1]

Contents

[hide]

History

The Uniform Resource Locator was created in 1994[2] by Tim Berners-Lee and the URI working group of the Internet Engineering Task Force (IETF) as an outcome of collaboration started at the IETF Living Documents "Birds of a Feather" session in 1992.[3][4] The format combines the pre-existing system of domain names (created in 1985) with file path syntax, where forward slashes are used to separate folder and file names. Conventions already existed where server names could be prepended to complete file paths, preceded by a double-slash (//).[5]

Syntax

Every URL consists of some of the following: the scheme name (commonly called protocol), followed by a colon, two slashes,[note 1] then, depending on scheme, a domain name[note 2] (alternatively, IP address), a port number, the path of the resource to be fetched or the program to be run, then, for programs such as Common Gateway Interface (CGI) scripts, a query string,[7][8] and an optional fragment identifier.[9]

The syntax is:-
scheme://domain:port/path?query_string#fragment_id

Other examples of scheme names include https:, gopher:, wais:, ftp:. URLs with https as a scheme (such as https://example.com/) require that requests and responses will be made over a secure connection to the website. Some schemes that require authentication allow a username, and perhaps a password too, to be embedded in the URL, for example ftp://asmith@ftp.example.org. Passwords embedded in this way are not conducive to secure working, but the full possible syntax is
scheme://username:password@domain:port/path?query_string#fragment_id

Absolute and relative URLs

According to RFC 1738, which defined URLs in 1994, when resources contain references to other resources, they can use relative links to define the location of the second resource as if to say, "in the same place as this one except with the following relative path". It went on to say that such relative URLs are dependent on the original URL containing a hierarchical structure against which the relative link is based, and that the ftp, http, and file URL schemes are examples of some that can be considered hierarchical, with the components of the hierarchy being separated by "/".[10]

URLs as locators

A URL is a URI that, "in addition to identifying a resource, provides a means of locating the resource by describing its primary access mechanism (e.g., its network location)".[11][12]

Internet hostnames

On the Internet, a hostname is a domain name assigned to a host computer. This is usually a combination of the host's local name with its parent domain's name. For example, en.example.org consists of a local hostname (en) and the domain name example.org. The hostname is translated into an IP address via the local hosts file, or the domain name system (DNS) resolver. It is possible for a single host computer to have several hostnames; but generally the operating system of the host prefers to have one hostname that the host uses for itself.

Any domain name can also be a hostname, as long as the restrictions mentioned below are followed. For example, both "en.example.org" and "example.org" can be hostnames if they both have IP addresses assigned to them. The domain name "xyz.example.org" may not be a hostname if it does not have an IP address, but "aa.xyz.example.org" may still be a hostname. All hostnames are domain names, but not all domain names are hostnames.

See also

Notes

  1. ^ Berners-Lee has said that, given the colon following the URI scheme, the two forward slashes before the domain name were unnecessary.[6]
  2. ^ Berners-Lee also later regretted the use of dots to separate the parts of the domain name, wishing he had used slashes throughout. For example, http://www.example.com/path/to/name would have been written http:com/example/www/path/to/name[5]

References

  1. ^ RFC 3305 "URI Partitioning: There is some confusion in the web community over the partitioning of URI space, specifically, the relationship among the concepts of URL, URN, and URI. The confusion owes to the incompatibility between two different views of URI partitioning, which we call the 'classical' and 'contemporary' views."
  2. ^ RFC 1738 Uniform Resource Locators (URL). This RFC is now obsolete. It has been superseded by a newer RFC (see the RFC Index)
  3. ^ "Living Documents BoF Minutes". W3.org. http://www.w3.org/Conferences/IETF92/WWX_BOF_mins.html. Retrieved 2011-12-26. 
  4. ^ "URL Specification". http://www.w3.org/Addressing/URL/url-spec.txt. Retrieved 2011-12-26. 
  5. ^ a b Berners-Lee, Tim. "Frequently asked questions by the press". http://www.w3.org/People/Berners-Lee/FAQ#etc. Retrieved 2010-02-03. 
  6. ^ "Technology | Berners-Lee 'sorry' for slashes". BBC News. 2009-10-14. http://news.bbc.co.uk/1/hi/technology/8306631.stm. Retrieved 2010-02-14. 
  7. ^ RFC 1738
  8. ^ "PHP parse_url() Function". http://us.php.net/parse_url. Retrieved 2009-03-12. 
  9. ^ "URL Syntax". Pangea.stanford.edu. 2004-07-20. http://pangea.stanford.edu/computerinfo/hosting/urlsyntax/index.html. Retrieved 2011-12-26. 
  10. ^ Berners-Lee, Tim; et al (December 1994). "Uniform Resource Locators (URL)". IETF. http://www.faqs.org/rfcs/rfc1738.html. Retrieved 20 November 2010. "Hierarchical schemes and relative links. In some cases, URLs are used to locate resources that contain pointers to other resources. In some cases, those pointers are represented as relative links where the expression of the location of the second resource is in terms of "in the same place as this one except with the following relative path". Relative links are not described in this document. However, the use of relative links depends on the original URL containing a hierarchical structure against which the relative link is based. Some URL schemes (such as the ftp, http, and file schemes) contain names that can be considered hierarchical; the components of the hierarchy are separated by "/"." 
  11. ^ Tim Berners-Lee, Roy T. Fielding, Larry Masinter. (January 2005). “Uniform Resource Identifier (URI): Generic Syntax”. Internet Society. RFC 3986; STD 66.
  12. ^ By describing its primary access mechanism

External links